﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using DAL;
using System.Data;
namespace BLL
{
    public class liberBLL
    {
        liberDAL dal = new liberDAL();
        public List<liber> GetListALL() {
            return dal.GetListALL();
        }
        public DataTable GetDataAll()
        {
            return dal.GetDataAll();
        }
        public DataTable GetDataByID(liber model)
        {
            return dal.GetDataByID(model);
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="lb"></param>
        /// <returns></returns>
        public bool AddliberDAL(liber lb)
        {
            return dal.AddliberDAL(lb);
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        public List<liber> ShowNew()
        {
            return dal.ShowNew();
        }

        /// <summary>
        /// id显示
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public liber ShowSelect(int id)
        {
            return dal.ShowNew().Where(a => a.liberID == id).FirstOrDefault();
        }
        /// <summary>
        /// 类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<liber> ShowNert(int sid)
        {
            return dal.ShowNew().Where(a => a.CuntID == sid).ToList();
        }
        /// <summary>
        /// 书名查询
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public DataTable ShowSel(string name)
        {
            return dal.ShowSel(name);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool ShowUdd(liber lise)
        {
            return dal.ShowUdd(lise);
        }
        /// <summary>
        ///删除
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool Delete(liber lise)
        {
            return dal.Delete(lise);
        }
    }
}
